package com.kaka.mapper;

import com.kaka.pojo.Users;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UsersMapper {

    Users selectByUserName(String username);

    List<Users> selectAll();

    Users selectByUid(int id);

    @Update("update users set username=#{username},password=#{password},imgUrl=#{imgUrl},email=#{email},phoneNum=#{phoneNum},status=#{status} where id=#{id}")
    int updateUsers(Users users);

    @Delete("delete from users where id=#{id}")
    int deleteById(int id);

    int insertUsers(Users users);
}
